<div id="category-author" class="row-fluid" style="margin-top:40px;">
	<div class="row-fluid">
		<div class="span12">
		  <?php $this->widget('bootstrap.widgets.TbAlert', array(
				'block'=>true, // display a larger alert block?
				'fade'=>true, // use transitions?
				'closeText'=>'&times;', // close link text - if set to false, no close link is displayed
				'alerts'=>array( // configurations per alert type
					'success'=>array('block'=>true, 'fade'=>true, 'closeText'=>'&times;'), 
					'error'=>array('block'=>true, 'fade'=>true, 'closeText'=>'&times;'),
					// success, info, warning, error or danger
				),
			)); ?>
		</div>
	</div>
	<div class="row-fluid">
		<div class="span9">
			<h2>
				<?php echo (!empty($title)) ? $title : "List owner categories";?>
			</h2><hr>
			<h5 class="sub-title"><i>Categories that you can write articles on it (Maximum is 3 categories)</i></h5>
			<?php echo CHtml::link('Add more category',array('users/addCategory'), array('class'=>'floatRight btn btn-small btn-primary')); ?>
			<?php echo CHtml::link('Create owner category',array('users/createCategory'), array('class'=>'floatRight btn btn-small btn-primary')); ?>
			<div style="clear: both"></div>
			<?php
			//$this->widget('zii.widgets.CListView', array(
			$this->widget('zii.widgets.grid.CGridView', array(
				'dataProvider'=>$dataProvider,
				//'itemView'=>'_item',
				//'pagerCssClass'=>'paging',
				//'template'=>"{items}\n{pager}",
				'itemsCssClass'=>'table table-bordered table-striped table-hover',
				'summaryCssClass'=>'summary widget-title',
				'cssFile'=> Yii::app()->request->baseUrl.WWWROOT_BACKEND."/css/gridview/styles.css",
				'htmlOptions'=>array('class'=>'widget-content nopadding grid-view'),
				'ajaxUpdate'=>false,
				'columns'=>array(
					array(
						//'header'=>'Category',
						'name' => 'category',
						//'value' => '$data->getAuthorName($data->user_id)',
						'type'=>'raw',
						'value' => '$data->category' //'CHtml::link(CHtml::encode($data->category),array("admin/view","id"=>$data->id))',
					),
					array(
						'name'=>'created',
						'type'=>'datetime',
						'filter'=>false,
					),
					array(
						'class'=>'CButtonColumn',
						'template'=>'{update}{delete}',
						'buttons'=>array
						(
							'update' => array
							(
								'url'=>'Yii::app()->createUrl("users/updateCategory", array("id"=>$data->id))',
							),
							'delete' => array
							(
								'url'=>'Yii::app()->createUrl("users/removeCategory", array("id"=>$data->id))',
							),
							//'class'=>'CButtonColumn',
							//'template'=>'{update}{delete}',
						)
					),
				),
			)); ?>
		</div>
		<div class="span3">
			<?php
			$this->renderPartial('//menu');
			?>
			
			
		</div>
	</div>
</div>